<template>
  <div class="wrap">
    <h2>
      {{ $t("userlogin") }}
    </h2>
    <div class="login-content" v-loading="loginLoading">
      <el-form
        ref="form"
        :model="form"
        label-width="0px"
        status-icon
        :rules="rules"
      >
        <el-form-item id="qrcodeitem">
          <wxlogin
            appid="wx8a42b7e70e266e71"
            :scope="'snsapi_login'"
            :theme="'black'"
            :redirect_uri="encodeURIComponent('http://www.snmake.com/#/loginnext')"
            :href="'data:text/css;base64,LmltcG93ZXJCb3ggLnFyY29kZxxx='"
            rel="external nofollow"
          >
          </wxlogin>
        </el-form-item> 
      </el-form>
    </div>
  </div>
</template> 
<script>
import { Message } from "element-ui"; 
import wxlogin from "vue-wxlogin"; 
export default {
  
  data() {
    return {
      loginLoading: false,
      isLogin: false,
      siteinfo:{}
    };
  }, 
  metaInfo() {
    return {
      title: this.siteinfo.name,
      meta: [
        {
          vmid: "description",
          name: "description",
          content: this.siteinfo.descript,
        },
         {
          vmid: "keyword",
          name: "keyword",
          content: this.siteinfo.keyword,
        },
      ],
    };
  },
  components :{ 
    wxlogin,
  },
  mounted() {
    this.init(); 
    var siteinfo = localStorage.getItem("site_info")
    if(siteinfo != undefined){
        siteinfo = JSON.parse(siteinfo)
    }
    this.siteinfo = siteinfo; 
  },
  methods: {
    init() {
    },
  },
};
</script>

<style lang="less" scope>
.wrap {
  h2 {
    font-size: 18px;
    margin: 40px 0;
    padding-bottom: 25px;
    font-weight: 500;
    border-bottom: 0;
  }
  .login-content {
    #qrcodeitem {
      align-items:center;
      text-align:center;
      width: 320px;
      margin-left: 120px;
      height: 400px;
      border: 1px solid gray;
    }
    .el-input__inner {
      -webkit-appearance: none;
      background-color: #fff;
      background-image: none;
      border-radius: 0px;
      border: 0px solid #989898;
      border-bottom: 1px solid #989898;
      box-sizing: border-box;
      color: #989898;
      display: inline-block;
      font-size: inherit;
      height: 40px;
      line-height: 40px;
      outline: 0;
      padding: 0 15px;
      transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
      width: 100%;
    }
  } 
  .login-remember-wrap {
    padding: 30px 0;
    font-size: 12px;
    color: #000;
    letter-spacing: 1px;
    font-weight: 500;
    text-transform: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    letter-spacing: 2px;
    .login-remember-checkbox {
      display: flex;
      align-items: center;
      label {
        margin-left: 5px;
      }
    }
    .login-remember-lost {
      a {
        font-size: 12px;
        color: #ff0000;
        letter-spacing: 2px;
        font-weight: 500;
      }
      a:hover {
        color: #000;
      }
    }
  }
  .login-btn {
    button {
      background: #4d4d4d;
      font-size: 18px;
      padding: 3px 20px;
      color: #fff;
      border: 0 none;
      cursor: pointer;
      height: 40px;
      line-height: 40px;
    }
    button:hover {
      background-color: #f00;
    }
  }
}
</style>